{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'update_time': 1527242904.403221,\n",
       " 'template_type_list': ['车抵贷'],\n",
       " 'template_type_num': 1,\n",
       " 'first_class_question_num': 24,\n",
       " 'data': {'车抵贷': [{'id': 22,\n",
       "    'description': '',\n",
       "    'priority': 1,\n",
       "    'need_question': None,\n",
       "    'children': [{'handle_method': 'match',\n",
       "      'chance': 2,\n",
       "      'priority': 1,\n",
       "      'question_text': '你的身份证后四位是多少?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 1,\n",
       "      'audio': 'c284b000d2e0d228bf9189e6b9ec8f6c.mp3',\n",
       "      'api_dependency': '身份证后四位',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'exit'},\n",
       "     {'handle_method': 'match',\n",
       "      'chance': 2,\n",
       "      'priority': 1,\n",
       "      'question_text': '你的手机号码是多少?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 2,\n",
       "      'audio': '2f5af8354571f1ad721e51c8101cdb76.mp3',\n",
       "      'api_dependency': '手机号码',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'next'}]},\n",
       "   {'id': 23,\n",
       "    'description': '',\n",
       "    'priority': 2,\n",
       "    'need_question': None,\n",
       "    'children': [{'handle_method': 'match',\n",
       "      'chance': 1,\n",
       "      'priority': 2,\n",
       "      'question_text': '您的出生年月日是多少?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 3,\n",
       "      'audio': '9c766798f0ac38b53f968166c1bc0a96.mp3',\n",
       "      'api_dependency': '出生年月日',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'classify',\n",
       "      'chance': 1,\n",
       "      'priority': 2,\n",
       "      'question_text': '您的年龄是多少?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 4,\n",
       "      'audio': 'f55efc132af4687651abad7f3389114c.mp3',\n",
       "      'api_dependency': '年龄',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'classify',\n",
       "      'chance': 1,\n",
       "      'priority': 2,\n",
       "      'question_text': '您的生肖属性是?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 5,\n",
       "      'audio': 'd186bbac85f36f8c8602707b296bff82.mp3',\n",
       "      'api_dependency': '生肖',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'match',\n",
       "      'chance': 1,\n",
       "      'priority': 2,\n",
       "      'question_text': '您的户籍所在地是哪里?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 6,\n",
       "      'audio': 'ffbfcbfba5a53a5743e755d72883f433.mp3',\n",
       "      'api_dependency': '户籍',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'match',\n",
       "      'chance': 1,\n",
       "      'priority': 2,\n",
       "      'question_text': '您的身份证有效期是?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 7,\n",
       "      'audio': '6f1085d5116182db8461b16dabd87cb9.mp3',\n",
       "      'api_dependency': '身份证有效期',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'record',\n",
       "      'chance': 1,\n",
       "      'priority': 2,\n",
       "      'question_text': '您的身份证发证机关是?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 8,\n",
       "      'audio': 'd1eba044bede78c3ed947184fa2c92d5.mp3',\n",
       "      'api_dependency': '',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'}]},\n",
       "   {'id': 16,\n",
       "    'description': '',\n",
       "    'priority': 3,\n",
       "    'need_question': {'handle_method': 'api',\n",
       "     'chance': 2,\n",
       "     'priority': 3,\n",
       "     'question_text': '填写现住址和身份证住址是否同一省份?',\n",
       "     'intent_model': 'intent',\n",
       "     'question_description': 'method 为 api 标识此问题不用问用户, 答案自api中取',\n",
       "     'condition': {'branch': {'否': [{'id': 1,\n",
       "         'description': '',\n",
       "         'priority': None,\n",
       "         'need_question': None,\n",
       "         'children': [{'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '4a6f96cdd634c5221db90ba62d58569a.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '你来现住省份多久了?',\n",
       "           'id': 10,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'a7e42dbaa81722a9f8e5f555c54c2dd8.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '你是否在现住省份定居?',\n",
       "           'id': 11,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'bc2c2ea5c3b49eab8991f255c6df6cf5.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您在这个省份是否有其它亲属?如果有, 请告诉我他的姓名以及您和他的关系?',\n",
       "           'id': 12,\n",
       "           'fail_policy': 'todo'}]}]},\n",
       "      'description': '',\n",
       "      'branch_list': ['否']},\n",
       "     'audio': '437619ff517f54a58f4b77b950922934.mp3',\n",
       "     'id': 9,\n",
       "     'fail_policy': 'next',\n",
       "     'model': 'todo',\n",
       "     'group': [],\n",
       "     'api_dependency': '现住址和身份证同省'},\n",
       "    'children': []},\n",
       "   {'id': 17,\n",
       "    'description': '',\n",
       "    'priority': 4,\n",
       "    'need_question': {'handle_method': 'classify',\n",
       "     'chance': 2,\n",
       "     'priority': 4,\n",
       "     'question_text': '您申请表上填写的地址是您的现住址吗?',\n",
       "     'intent_model': 'intent',\n",
       "     'question_description': '',\n",
       "     'condition': {'branch': {'否': [{'id': 2,\n",
       "         'description': '',\n",
       "         'priority': 10,\n",
       "         'need_question': {'handle_method': 'record',\n",
       "          'intent_model': 'intent',\n",
       "          'question_description': '',\n",
       "          'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "          'audio': '1b838a6854c771c4394e082e7944002a.mp3',\n",
       "          'api_dependency': '',\n",
       "          'group': [],\n",
       "          'chance': 1,\n",
       "          'priority': 10,\n",
       "          'model': 'todo',\n",
       "          'question_text': '您的现住址是哪里?',\n",
       "          'id': 15,\n",
       "          'fail_policy': 'todo'},\n",
       "         'children': []}],\n",
       "       '是': [{'id': 3,\n",
       "         'description': '',\n",
       "         'priority': 10,\n",
       "         'need_question': {'handle_method': 'classify',\n",
       "          'intent_model': 'intent',\n",
       "          'question_description': '信问问题',\n",
       "          'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "          'audio': '24ac40e48999b03a51aa9054ccfcd5e0.mp3',\n",
       "          'api_dependency': '信问',\n",
       "          'group': [],\n",
       "          'chance': 2,\n",
       "          'priority': 10,\n",
       "          'model': 'todo',\n",
       "          'question_text': '请回答屏幕上的问题(请回答答案对应的数字)',\n",
       "          'id': 14,\n",
       "          'fail_policy': 'todo'},\n",
       "         'children': []}]},\n",
       "      'description': '',\n",
       "      'branch_list': ['是', '否']},\n",
       "     'audio': 'b9659e14d168be10fc6168f110b4ad03.mp3',\n",
       "     'id': 13,\n",
       "     'fail_policy': 'next',\n",
       "     'model': 'todo',\n",
       "     'group': [],\n",
       "     'api_dependency': ''},\n",
       "    'children': []},\n",
       "   {'id': 18,\n",
       "    'description': '',\n",
       "    'priority': 5,\n",
       "    'need_question': {'handle_method': 'classify',\n",
       "     'chance': 2,\n",
       "     'priority': 5,\n",
       "     'question_text': '您的职业身份是什么?是自己做生意,是在职人员,是学生,是在工地工作,还是待业?',\n",
       "     'intent_model': 'intent',\n",
       "     'question_description': '',\n",
       "     'condition': {'branch': {'待业': [{'id': 4,\n",
       "         'description': '',\n",
       "         'priority': 10,\n",
       "         'need_question': {'handle_method': 'record',\n",
       "          'intent_model': 'intent',\n",
       "          'question_description': '',\n",
       "          'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "          'audio': '2a04c1f0a0c4684641769828caa2d37e.mp3',\n",
       "          'api_dependency': '',\n",
       "          'group': [],\n",
       "          'chance': 2,\n",
       "          'priority': 10,\n",
       "          'model': 'todo',\n",
       "          'question_text': '您目前收入来源是什么?',\n",
       "          'id': 34,\n",
       "          'fail_policy': 'todo'},\n",
       "         'children': []}],\n",
       "       '在职人员': [{'id': 5,\n",
       "         'description': '',\n",
       "         'priority': 10,\n",
       "         'need_question': {'handle_method': 'record',\n",
       "          'intent_model': 'intent',\n",
       "          'question_description': '',\n",
       "          'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "          'audio': '87a52f0e5f3b08ccea999d44dd8f7df9.mp3',\n",
       "          'api_dependency': '',\n",
       "          'group': [],\n",
       "          'chance': 2,\n",
       "          'priority': 10,\n",
       "          'model': 'todo',\n",
       "          'question_text': '您的工作单位全称是什么?',\n",
       "          'id': 28,\n",
       "          'fail_policy': 'todo'},\n",
       "         'children': [{'handle_method': 'match',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'fa5e14613853a354e9e6eb3000a68c0f.mp3',\n",
       "           'api_dependency': '公司地址',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您工作单位的地址是哪里?',\n",
       "           'id': 29,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '9fd7f42c732d7c48641abcc1f2f4d07e.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您的年收入是多少?',\n",
       "           'id': 30,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '78b81b8410958f29d1cf1d0760da683e.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您从事什么行业?',\n",
       "           'id': 31,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'b744cadd78e64c166f55c8b3eb737208.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您在公司是什么职位?',\n",
       "           'id': 32,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '61063c07c023845e119ad66d4cc5d987.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您从事这份工作多久了?',\n",
       "           'id': 33,\n",
       "           'fail_policy': 'todo'}]}],\n",
       "       '工地': [{'id': 6,\n",
       "         'description': '',\n",
       "         'priority': None,\n",
       "         'need_question': None,\n",
       "         'children': [{'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'ef3db4463aca3317d440dc86bdc253f4.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您来这个工地多久了?',\n",
       "           'id': 17,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'e21145d1152e31a5cb3103b9825a27d2.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '这个工地会持续多长时间?',\n",
       "           'id': 18,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '393e192c73af13d4132375cbdbc46039.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您是否有家属陪同来这个工地?',\n",
       "           'id': 19,\n",
       "           'fail_policy': 'todo'}]}],\n",
       "       '学生': [{'id': 7,\n",
       "         'description': '',\n",
       "         'priority': 10,\n",
       "         'need_question': {'handle_method': 'api',\n",
       "          'intent_model': 'intent',\n",
       "          'question_description': '',\n",
       "          'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "          'audio': '42d8c0c39f19fe861fdc0e5adec007d6.mp3',\n",
       "          'api_dependency': '年龄大于24',\n",
       "          'group': [],\n",
       "          'chance': 2,\n",
       "          'priority': 10,\n",
       "          'model': 'todo',\n",
       "          'question_text': '年龄是否大于24?',\n",
       "          'id': 35,\n",
       "          'fail_policy': 'todo'},\n",
       "         'children': []}],\n",
       "       '其它': [{'id': 8,\n",
       "         'description': '',\n",
       "         'priority': 10,\n",
       "         'need_question': {'handle_method': 'record',\n",
       "          'intent_model': 'intent',\n",
       "          'question_description': '',\n",
       "          'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "          'audio': '9c25a4bebc53438fbff958e5a00ed819.mp3',\n",
       "          'api_dependency': '',\n",
       "          'group': [],\n",
       "          'chance': 2,\n",
       "          'priority': 10,\n",
       "          'model': 'todo',\n",
       "          'question_text': '你工作单位全称是什么?',\n",
       "          'id': 36,\n",
       "          'fail_policy': 'todo'},\n",
       "         'children': []}],\n",
       "       '企业主': [{'id': 9,\n",
       "         'description': '',\n",
       "         'priority': 10,\n",
       "         'need_question': {'handle_method': 'record',\n",
       "          'intent_model': 'intent',\n",
       "          'question_description': '',\n",
       "          'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "          'audio': '4284f09811b81b86d963c25e8ff38098.mp3',\n",
       "          'api_dependency': '',\n",
       "          'group': [],\n",
       "          'chance': 2,\n",
       "          'priority': 10,\n",
       "          'model': 'todo',\n",
       "          'question_text': '您公司主要经营什么?',\n",
       "          'id': 20,\n",
       "          'fail_policy': 'todo'},\n",
       "         'children': [{'handle_method': 'match',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '32cf24e543036c8eb357f34e520eea4d.mp3',\n",
       "           'api_dependency': '公司地址',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您公司的地址在哪里?',\n",
       "           'id': 21,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '6c64ff334bbe6d9d0a4cb631c2e188fd.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您公司的名称叫什么?',\n",
       "           'id': 22,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'd670d082cef71eb43c2ff09e5757f8fd.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '你的公司有申请营业执照吗?',\n",
       "           'id': 23,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'c1588b4c192a720cb4e0d31933f06f52.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您公司年营业额是多少?',\n",
       "           'id': 24,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '7df2fbf4ac6e8b3dcb6fc979c881470e.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您公司的年净利润是多少?',\n",
       "           'id': 25,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '02f1c1c7487daa5e0abebf6e4cbdb117.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您公司有多少员工?',\n",
       "           'id': 26,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'a05118474d5a8a941f8aa4d89bad2c04.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您每个月工资发放支出大约有多少?',\n",
       "           'id': 27,\n",
       "           'fail_policy': 'todo'}]}]},\n",
       "      'description': '',\n",
       "      'branch_list': ['工地', '企业主', '在职人员', '待业', '学生', '其它']},\n",
       "     'audio': 'a8bb27c206d6a138c1cb5259f0c96fa7.mp3',\n",
       "     'id': 16,\n",
       "     'fail_policy': 'next',\n",
       "     'model': 'todo',\n",
       "     'group': [],\n",
       "     'api_dependency': ''},\n",
       "    'children': []},\n",
       "   {'id': 19,\n",
       "    'description': '',\n",
       "    'priority': 6,\n",
       "    'need_question': {'handle_method': 'classify',\n",
       "     'chance': 2,\n",
       "     'priority': 6,\n",
       "     'question_text': '{}跟你是什么关系?',\n",
       "     'intent_model': 'intent',\n",
       "     'question_description': '',\n",
       "     'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "     'audio': '4cb8db719e599617fa26383456466ed3.mp3',\n",
       "     'id': 37,\n",
       "     'fail_policy': 'next',\n",
       "     'model': 'todo',\n",
       "     'group': [{'id': 10,\n",
       "       'description': '',\n",
       "       'priority': 10,\n",
       "       'need_question': None,\n",
       "       'children': [{'handle_method': 'record',\n",
       "         'intent_model': 'intent',\n",
       "         'question_description': '',\n",
       "         'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "         'audio': '616a7f06cd0388a852a05a443e587d13.mp3',\n",
       "         'fail_policy': 'todo',\n",
       "         'group': [],\n",
       "         'chance': 1,\n",
       "         'priority': 10,\n",
       "         'question_text': '他/她从事什么工作?',\n",
       "         'id': 38,\n",
       "         'api_dependency': '',\n",
       "         'model': 'todo'},\n",
       "        {'handle_method': 'record',\n",
       "         'intent_model': 'intent',\n",
       "         'question_description': '',\n",
       "         'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "         'audio': 'b9ae2646a8090f91ce981e6c108f0ba3.mp3',\n",
       "         'fail_policy': 'todo',\n",
       "         'group': [],\n",
       "         'chance': 1,\n",
       "         'priority': 10,\n",
       "         'question_text': '他/她工作单位的全称是什么?',\n",
       "         'id': 39,\n",
       "         'api_dependency': '',\n",
       "         'model': 'todo'}]}],\n",
       "     'api_dependency': '亲属关系'},\n",
       "    'children': []},\n",
       "   {'id': 20,\n",
       "    'description': '',\n",
       "    'priority': 7,\n",
       "    'need_question': {'handle_method': 'classify',\n",
       "     'chance': 2,\n",
       "     'priority': 7,\n",
       "     'question_text': '你目前的婚姻状态是什么? 未婚,已婚, 离异, 还是丧偶?',\n",
       "     'intent_model': 'intent',\n",
       "     'question_description': '',\n",
       "     'condition': {'branch': {'丧偶': [{'id': 11,\n",
       "         'description': '',\n",
       "         'priority': None,\n",
       "         'need_question': None,\n",
       "         'children': [{'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '8d3f1b18746add1a476c35a8f8c9cda5.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母从事什么工作?',\n",
       "           'id': 53,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'e8594106f0198961a3c295d7ef5e90ac.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母今年几岁?',\n",
       "           'id': 54,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '1e4f83f3067616731466e6deffc3a37b.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您是否有亲兄弟姐妹?如果有请告诉我他们的名字以及和您关系?',\n",
       "           'id': 55,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '2da4b0578e3ea3dd63389bb2c2e37c95.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母的年收入是多少?',\n",
       "           'id': 56,\n",
       "           'fail_policy': 'todo'}]}],\n",
       "       '已婚': [{'id': 12,\n",
       "         'description': '',\n",
       "         'priority': None,\n",
       "         'need_question': None,\n",
       "         'children': [{'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '58c788674be791e44173440de3b897f2.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您有几个小孩?',\n",
       "           'id': 41,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '6afb475c378e3c80902600f42b8b551d.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您小孩今年几岁?',\n",
       "           'id': 42,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '0f2afc2a4a660037dd224419cd9962b4.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您几几年结的婚?',\n",
       "           'id': 43,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '3f1f2f946d247669d575b1ae984f44c8.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您的配偶年均收是多少?',\n",
       "           'id': 44,\n",
       "           'fail_policy': 'todo'}]}],\n",
       "       '未婚': [{'id': 13,\n",
       "         'description': '',\n",
       "         'priority': None,\n",
       "         'need_question': None,\n",
       "         'children': [{'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '328b26e4cea1ea3d6080472029b32bf3.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母从事什么工作?',\n",
       "           'id': 45,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '7784e47532c71d04a2d859f61cbe1c0a.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母今年几岁?',\n",
       "           'id': 46,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '1e4f83f3067616731466e6deffc3a37b.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您是否有亲兄弟姐妹?如果有请告诉我他们的名字以及和您关系?',\n",
       "           'id': 47,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'f0c43b576ba6a08d43b7704b5984a8b7.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母的年收入是多少?',\n",
       "           'id': 48,\n",
       "           'fail_policy': 'todo'}]}],\n",
       "       '离异': [{'id': 14,\n",
       "         'description': '',\n",
       "         'priority': None,\n",
       "         'need_question': None,\n",
       "         'children': [{'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '8d3f1b18746add1a476c35a8f8c9cda5.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母从事什么工作?',\n",
       "           'id': 49,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'e8594106f0198961a3c295d7ef5e90ac.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母今年几岁?',\n",
       "           'id': 50,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '1e4f83f3067616731466e6deffc3a37b.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您是否有亲兄弟姐妹?如果有请告诉我他们的名字以及和您关系?',\n",
       "           'id': 51,\n",
       "           'fail_policy': 'todo'},\n",
       "          {'handle_method': 'record',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': 'f0c43b576ba6a08d43b7704b5984a8b7.mp3',\n",
       "           'api_dependency': '',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'model': 'todo',\n",
       "           'question_text': '您父母的年收入是多少?',\n",
       "           'id': 52,\n",
       "           'fail_policy': 'todo'}]}]},\n",
       "      'description': '',\n",
       "      'branch_list': ['已婚', '未婚', '离异', '丧偶']},\n",
       "     'audio': 'c5608f58cc7fa279532bc498c19d45e6.mp3',\n",
       "     'id': 40,\n",
       "     'fail_policy': 'todo',\n",
       "     'model': 'todo',\n",
       "     'group': [],\n",
       "     'api_dependency': '婚姻状态'},\n",
       "    'children': []},\n",
       "   {'id': 24,\n",
       "    'description': '',\n",
       "    'priority': 8,\n",
       "    'need_question': None,\n",
       "    'children': [{'handle_method': 'record',\n",
       "      'chance': 1,\n",
       "      'priority': 8,\n",
       "      'question_text': '您的车辆是本人使用吗?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 57,\n",
       "      'audio': '32dfcb70c7844742ef4a05d4ed2c849a.mp3',\n",
       "      'api_dependency': '',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'record',\n",
       "      'chance': 1,\n",
       "      'priority': 8,\n",
       "      'question_text': '您的车辆是什么时候购买的?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 58,\n",
       "      'audio': '03fcc6bdd71028f6282cf38f380a7c8d.mp3',\n",
       "      'api_dependency': '',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'match',\n",
       "      'chance': 1,\n",
       "      'priority': 8,\n",
       "      'question_text': '您的车牌号是多少?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 59,\n",
       "      'audio': 'a77770cb79bd40fa417ac76385a8e626.mp3',\n",
       "      'api_dependency': '车牌号',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'match',\n",
       "      'chance': 1,\n",
       "      'priority': 8,\n",
       "      'question_text': '您的车辆是什么品牌?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 60,\n",
       "      'audio': '8e9e66d042c4556c792b1b56a53a07d3.mp3',\n",
       "      'api_dependency': '车辆品牌',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'match',\n",
       "      'chance': 1,\n",
       "      'priority': 8,\n",
       "      'question_text': '您的车辆是什么排量?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 61,\n",
       "      'audio': '12908cc5681f02e5aebe00c52a5625ca.mp3',\n",
       "      'api_dependency': '车辆排量',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'classify',\n",
       "      'chance': 1,\n",
       "      'priority': 8,\n",
       "      'question_text': '您的车辆是什么颜色?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 62,\n",
       "      'audio': '2a384c4ad752c6ef323a82abfb3af4eb.mp3',\n",
       "      'api_dependency': '车辆颜色',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'}]},\n",
       "   {'id': 21,\n",
       "    'description': '',\n",
       "    'priority': 9,\n",
       "    'need_question': {'handle_method': 'record',\n",
       "     'chance': 1,\n",
       "     'priority': 9,\n",
       "     'question_text': '您的贷款是什么用途?',\n",
       "     'intent_model': 'intent',\n",
       "     'question_description': '',\n",
       "     'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "     'audio': '82af10b9e94923924f4c069d49224672.mp3',\n",
       "     'id': 63,\n",
       "     'fail_policy': 'todo',\n",
       "     'model': 'todo',\n",
       "     'group': [],\n",
       "     'api_dependency': '贷款用途'},\n",
       "    'children': []},\n",
       "   {'id': 25,\n",
       "    'description': '',\n",
       "    'priority': 10,\n",
       "    'need_question': None,\n",
       "    'children': [{'handle_method': 'record',\n",
       "      'chance': 1,\n",
       "      'priority': 10,\n",
       "      'question_text': '请问你目前使用的这个手机号,是您的常用号码吗?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 64,\n",
       "      'audio': '852a68c06c99347977fc41f6785e945b.mp3',\n",
       "      'api_dependency': '',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'record',\n",
       "      'chance': 1,\n",
       "      'priority': 10,\n",
       "      'question_text': '请问您使用这个号码多长时间了?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 65,\n",
       "      'audio': '68038c5150bea33380e28ed036d64620.mp3',\n",
       "      'api_dependency': '',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'record',\n",
       "      'chance': 1,\n",
       "      'priority': 10,\n",
       "      'question_text': '请问您是否有其他在使用的号码?如果有请告诉我号码?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "      'group': [],\n",
       "      'id': 66,\n",
       "      'audio': '6d8f6d1502d7a53086fd68e2279ec3ed.mp3',\n",
       "      'api_dependency': '',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'},\n",
       "     {'handle_method': 'classify',\n",
       "      'chance': 1,\n",
       "      'priority': 10,\n",
       "      'question_text': '请问您目前使用的这个手机号是您自己的身份证办理的吗?',\n",
       "      'intent_model': 'intent',\n",
       "      'question_description': '',\n",
       "      'condition': {'branch': {'否': [{'id': 15,\n",
       "          'description': '',\n",
       "          'priority': 10,\n",
       "          'need_question': {'handle_method': 'classify',\n",
       "           'intent_model': 'intent',\n",
       "           'question_description': '',\n",
       "           'condition': {'branch': {}, 'description': '', 'branch_list': []},\n",
       "           'audio': '1f4f6bae6e782d5572afd2d3e3d8d22c.mp3',\n",
       "           'fail_policy': 'todo',\n",
       "           'group': [],\n",
       "           'chance': 1,\n",
       "           'priority': 10,\n",
       "           'question_text': '号码办理人和您的关系?',\n",
       "           'id': 68,\n",
       "           'api_dependency': '',\n",
       "           'model': 'todo'},\n",
       "          'children': []}]},\n",
       "       'description': '',\n",
       "       'branch_list': ['否', '是']},\n",
       "      'group': [],\n",
       "      'id': 67,\n",
       "      'audio': '07cb08071e4c0a02f49e1779a4a16d26.mp3',\n",
       "      'api_dependency': '',\n",
       "      'model': 'todo',\n",
       "      'fail_policy': 'todo'}]}]}}"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import requests\n",
    "import json\n",
    "\n",
    "r = requests.get('http://192.168.31.186:8778/api/template')\n",
    "r.json()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "conda all lib",
   "language": "python",
   "name": "base"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
